<template>
  <div class="newslist-box">
    <ul class="mui-table-view">
      <router-link :to="'/home/newsinfo/'+item.id" tag="li" class="mui-table-view-cell mui-media" v-for="item in newsList" :key="item.id">
        <a href="javascript:;">
          <img class="mui-media-object mui-pull-left"  :src="item.img_url">
          <div class="mui-media-body">{{item.title}}
            <p class="mui-ellipsis">{{item.zhaiyao}}</p>
          </div>
        </a>
      </router-link>
    </ul>
  </div>
</template>
<script>
export default {
  data(){
    return {
      newsList:[]
    }
  },
  created(){
    this.getNewsList()
  },
  methods:{
    getNewsList(){
      this.$http.get('api/getnewslist').then(result => {
        if(result.body.status == 0){
          this.newsList = result.body.message;
        }else{

        }
      })
    }
  }
};
</script>
<style lang="scss" scope>
  .newslist-box {
    padding-bottom:50px;
  }
</style>